load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "handler.go",
        "migrationstats_collector.go",
        "queue.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/monitoring/metrics/virt-handler/migrationdomainstats",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/controller:go_default_library",
        "//pkg/monitoring/metrics/virt-handler/collector:go_default_library",
        "//pkg/monitoring/metrics/virt-handler/domainstats:go_default_library",
        "//pkg/virt-launcher/virtwrap/stats:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/rhobs/operator-observability-toolkit/pkg/operatormetrics:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "migrationdomainstats_suite_test.go",
        "migrationstats_collector_test.go",
    ],
    embed = [":go_default_library"],
    race = "on",
    deps = [
        "//pkg/monitoring/metrics/testing:go_default_library",
        "//pkg/virt-launcher/virtwrap/stats:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/rhobs/operator-observability-toolkit/pkg/operatormetrics:go_default_library",
    ],
)
